package rsb21411ls.d1123;


import java.util.ArrayList;
import java.util.List;

public class Student {
    private String name;
    private int score;

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", score=" + score +
                '}';
    }

    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }


    public static List<Student> getBl60(List<Student> list,int x) {//可变长度的容器---集合arraylist
        int l=list.size();
        List<Student> listbl60=new ArrayList<>();
        for (Student stud:list){
            if (stud.getScore()<x){
                listbl60.add(stud);

            }

        }return listbl60;}}

